package com.canal.config;

import com.canal.co.DataDictionaryCO;
import org.springframework.stereotype.Component;
import top.javatool.canal.client.annotation.CanalTable;
import top.javatool.canal.client.handler.EntryHandler;

@CanalTable("data_dictionary")      // 指定监听的表名
@Component
public class DataDictSyncHelper
        implements EntryHandler<DataDictionaryCO> // 指定表关联的实体对象（javabean） 字段名称与数据库对应
{



    @Override
    public void insert(DataDictionaryCO dataDictionary) {
        System.out.println(dataDictionary);

    }

    @Override
    public void update(DataDictionaryCO before, DataDictionaryCO after) {
        System.out.println(before);
        System.out.println(after);
    }

    @Override
    public void delete(DataDictionaryCO dataDictionary) {
        System.out.println(dataDictionary);
    }

}
